﻿<Window x:Class="ShapeDemo.MainForm"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPFShapeDemo" Height="600" Width="900" WindowStyle="None" AllowsTransparency="True" Background="{x:Null}" WindowStartupLocation="CenterScreen" xmlns:ShapeDemo_UC_WinProp="clr-namespace:ShapeDemo.UC.WinProp">
    <Grid>
        <Canvas x:Name="parentCanvas">
            <Rectangle Width="747" Canvas.Top="31" Canvas.Left="0"  x:Name="viewRectBody" Stroke="#FFF9F0F0" RadiusX="5" RadiusY="5" Height="435" VerticalAlignment="Bottom" Opacity="0.9">
        	    <Rectangle.Fill>
        	    	<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        	    		<GradientStop Color="#FF686363" Offset="0"/>
        	    		<GradientStop Color="#FF8E8A8A" Offset="1"/>
        	    		<GradientStop Color="#FFC4C4C4" Offset="0.504"/>
        	    	</LinearGradientBrush>
        	    </Rectangle.Fill>
            </Rectangle>
            <Canvas Width="747" Canvas.Top="467" Canvas.Left="0"  x:Name="propertyCanvas" Height="95" VerticalAlignment="Bottom"/>
            <Rectangle Height="30" Width="880" x:Name="viewRectTitle" Stroke="#FFF7F6F6" VerticalAlignment="Top" RadiusX="5" RadiusY="5" MouseLeftButtonDown="viewRectTitle_MouseLeftButtonDown" Opacity="0.8">
        	    <Rectangle.Fill>
        		    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        			    <GradientStop Color="#FF000000" Offset="0"/>
        			    <GradientStop Color="#FF7E7D7D" Offset="1"/>
        		    </LinearGradientBrush>
        	    </Rectangle.Fill>
            </Rectangle>
            <Canvas x:Name="drawingCanvas" Height="0" Canvas.Top="41" Canvas.Left="140" Width="0">
                <Canvas Width="600" Height="420" x:Name="viewCanvas" Background="AliceBlue" Opacity="1" />
                <Canvas Width="600" Height="420" x:Name="polylineCanvas" Cursor="Cross" Background="Transparent" Opacity="0.6" />
                <Canvas Width="600" Height="420" x:Name="polygonCanvas" Cursor="Cross" Background="Transparent" Opacity="0.6" />
                <Canvas Width="600" Height="420" x:Name="pointCanvas" Cursor="Cross" Background="Transparent" Opacity="0.6" />
                <Canvas Width="600" Height="420" x:Name="rectCanvas" Cursor="Cross" Background="Transparent" Opacity="0.6" />
                <Canvas Width="600" Height="420" x:Name="ellipseCanvas" Cursor="Cross" Background="Transparent" Opacity="0.6" />
                <Canvas Width="600" Height="420" x:Name="previewCanvas" Background="Transparent" Opacity="0.0"/>
            </Canvas>
            <Label Height="28" HorizontalAlignment="Left"  x:Name="label1" VerticalAlignment="Top" Width="120" Foreground="White" Canvas.Left="6" Canvas.Top="2" Content="WPF Shape Demo"/>
            <Button Height="23" HorizontalAlignment="Left"  x:Name="btnClose" VerticalAlignment="Bottom" Width="55" Click="btnClose_Click" Canvas.Left="818" Canvas.Top="4" Content="Close">
            	<Button.Background>
            		<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
            			<GradientStop Color="#FFF3F3F3" Offset="0"/>
            			<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
            			<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
            			<GradientStop Color="#FFCECCCC" Offset="1"/>
            		</LinearGradientBrush>
            	</Button.Background></Button>
            <GroupBox Canvas.Left="8" Canvas.Top="41" Header="Shape" Height="173" x:Name="gpboxShape" Width="126">
                <Grid>
                    <Canvas>
                        <Button Height="23" x:Name="btnPolygon" Width="100" Click="btnPolygon_Click" Canvas.Left="8" Canvas.Top="6" Content="Polygon">
                        	<Button.Background>
                        		<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        			<GradientStop Color="#FFF3F3F3" Offset="0"/>
                        			<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
                        			<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
                        			<GradientStop Color="#FFCCCACA" Offset="1"/>
                        		</LinearGradientBrush>
                        	</Button.Background></Button>
                        <Button Height="23" x:Name="btnPoint" Width="100" Click="btnPoint_Click" Canvas.Left="8" Canvas.Top="35" Content="Point">
                        	<Button.Background>
                        		<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        			<GradientStop Color="#FFF3F3F3" Offset="0"/>
                        			<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
                        			<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
                        			<GradientStop Color="#FFD1CECE" Offset="1"/>
                        		</LinearGradientBrush>
                        	</Button.Background></Button>
                        <Button Height="23" x:Name="btnRect" Width="100" Click="btnRect_Click" Canvas.Left="8" Canvas.Top="64" Content="Rect">
                        	<Button.Background>
                        		<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        			<GradientStop Color="#FFF3F3F3" Offset="0"/>
                        			<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
                        			<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
                        			<GradientStop Color="#FFCECCCC" Offset="1"/>
                        		</LinearGradientBrush>
                        	</Button.Background></Button>
                        <Button Height="23" x:Name="btnPolyline" Width="100" Click="btnPolyline_Click" Canvas.Left="8" Canvas.Top="93" Content="Polyline">
                        	<Button.Background>
                        		<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        			<GradientStop Color="#FFF3F3F3" Offset="0"/>
                        			<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
                        			<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
                        			<GradientStop Color="#FFD3D0D0" Offset="1"/>
                        		</LinearGradientBrush>
                        	</Button.Background></Button>
                        <Button Canvas.Left="8" Canvas.Top="122" Height="23" x:Name="btnEllipse" Width="100" Click="btnEllipse_Click" Content="Ellipse">
                        	<Button.Background>
                        		<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        			<GradientStop Color="#FFF3F3F3" Offset="0"/>
                        			<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
                        			<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
                        			<GradientStop Color="#FFCECBCB" Offset="1"/>
                        		</LinearGradientBrush>
                        	</Button.Background></Button>
                    </Canvas>
                </Grid>
            </GroupBox>
            <GroupBox Canvas.Left="8" Canvas.Top="230" Header="Mouse" Height="86" x:Name="gpboxMouse" Width="126">
                <Grid>
                    <Canvas>
                        <RadioButton Canvas.Left="8" Canvas.Top="12" Height="16" x:Name="rbPoint" Width="100" GroupName="gMouse" Content="Point"/>
                        <RadioButton Canvas.Left="8" Canvas.Top="34" Height="16" x:Name="rbDraw" Width="100" GroupName="gMouse" IsChecked="True" Content="Draw"/>
                    </Canvas>
                </Grid>
            </GroupBox>
            <GroupBox Canvas.Left="8" Canvas.Top="336" Header="File" Height="100" x:Name="gpboxFile" Width="126">
                <Grid>
                    <Canvas>
                        <Button Canvas.Left="8" Canvas.Top="12" Height="23" x:Name="btnSave" Width="100" Click="btnSave_Click" Content="Save">
                        	<Button.Background>
                        		<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        			<GradientStop Color="#FFF3F3F3" Offset="0"/>
                        			<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
                        			<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
                        			<GradientStop Color="#FFCCC9C9" Offset="1"/>
                        		</LinearGradientBrush>
                        	</Button.Background></Button>
                        <Button Canvas.Left="8" Canvas.Top="42" Height="23" x:Name="btnLoad" Width="100" Click="btnLoad_Click" Content="Load">
                        	<Button.Background>
                        		<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        			<GradientStop Color="#FFF3F3F3" Offset="0"/>
                        			<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
                        			<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
                        			<GradientStop Color="#FFD1D0D0" Offset="1"/>
                        		</LinearGradientBrush>
                        	</Button.Background></Button>
                    </Canvas>
                </Grid>
            </GroupBox>
            <Button Canvas.Left="753" Canvas.Top="4" Height="23" x:Name="button1" Width="55" Click="button1_Click" Content="About">
                <Button.Background>
                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        <GradientStop Color="#FFF3F3F3" Offset="0" />
                        <GradientStop Color="#FFEBEBEB" Offset="0.5" />
                        <GradientStop Color="#FFDDDDDD" Offset="0.5" />
                        <GradientStop Color="#FFCECCCC" Offset="1" />
                    </LinearGradientBrush>
                </Button.Background>
            </Button>
            <ShapeDemo_UC_WinProp:WinPropCommon x:Name="winCommonProp" Canvas.Left="750" Canvas.Top="30" Width="130" Height="531"/>
        </Canvas>
    	
    </Grid>
</Window>